python ValueError: zero-size array to reduction operation maximum which has no identity

46

#In this situation, the easiest solution is often:
try:
    # Your code
except ValueError:  #raised if `x` is empty.
    pass

Comments

Submit
0 Comments